package com.joker.warehouse.mapper;

import com.joker.warehouse.domain.PurchaseNeed;
import com.joker.warehouse.domain.vo.PurchaseNeedVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author lemon
 * @date 2025/01/13 20:23
 **/
@Mapper
@Repository
public interface NeedMapper {
    /**
     * 插入采购需求
     * @param purchaseNeed 采购需求
     */
    void insert(PurchaseNeed purchaseNeed);

    /**
     * 根据供应商id 查询未进行采购的采购需求
     * @param supplierId 供应商id
     * @return 采购需求集合
     */
    List<PurchaseNeedVO> selectBySuppId(Long supplierId);

    /**
     * 修改采购需求状态
     * @param ids 采购需求id集合
     */
    void updateStatus(@Param("ids") List<Long> ids);
}
